//
//  TYMNavigationController.m
//  AILock
//
//  Created by 谭亚明on 2020/6/17.
//  Copyright © 2020 tym. All rights reserved.
//

#import "TYMNavigationController.h"

@interface TYMNavigationController ()

@end

@implementation TYMNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if (self.childViewControllers.count != 0) {
        viewController.hidesBottomBarWhenPushed = YES;
        viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_back"] style:UIBarButtonItemStyleDone target:self action:@selector(back:)];
    }
    [super pushViewController:viewController animated:animated];
}

-(void)back:(id)sender{
    [self popViewControllerAnimated:YES];
}

@end
